package com.letoken.platform.repo.admin.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * Le账户-用户钱包提现记录
 * </p>
 *
 * @author 作者
 * @since 2022-12-12
 */
@Getter
@Setter
@TableName("withdraw")
@ApiModel(value = "Withdraw对象", description = "Le账户-用户钱包提现记录")
public class Withdraw extends Model<Withdraw> {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("订单流水号")
    @TableField("sn")
    private String sn;

    @ApiModelProperty("用户")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("代币")
    @TableField("token_id")
    private Integer tokenId;

    @ApiModelProperty("公链编号")
    @TableField("chain_id")
    private Integer chainId;

    @ApiModelProperty("提现地址")
    @TableField("address")
    private String address;

    @ApiModelProperty("接收用户ID")
    @TableField("to_id")
    private Integer toId;

    @ApiModelProperty("提现数量")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty("到账数量")
    @TableField("real_amount")
    private BigDecimal realAmount;

    @ApiModelProperty("提现手续费")
    @TableField("fee_amount")
    private BigDecimal feeAmount;

    @ApiModelProperty("消耗Gas")
    @TableField("gas_used")
    private BigDecimal gasUsed;

    @ApiModelProperty("0平台互转 1链上提现")
    @TableField("transfer_mode")
    private Integer transferMode;

    @ApiModelProperty("提现哈希")
    @TableField("txid")
    private String txid;

    @ApiModelProperty("交易状态(0正在处理/1已完成/2网络确认中/3失败/4异常)")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("后台处理时间")
    @TableField("process_time")
    private LocalDateTime processTime;

    @ApiModelProperty("提现失败原因（后台驳回理由可填写）")
    @TableField("response")
    private String response;

    @ApiModelProperty("用户申请提现备注（）")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("是否自动提币")
    @TableField("is_auto")
    private Boolean isAuto;

    @ApiModelProperty("创建日期")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("审核日期")
    @TableField("approved_date")
    private LocalDateTime approvedDate;

    @ApiModelProperty("审核人")
    @TableField("approved_by")
    private String approvedBy;

    @ApiModelProperty("审批状态(0待审批 1通过 2拒绝)")
    @TableField("approved_state")
    private Integer approvedState;

    @ApiModelProperty("审批意见")
    @TableField("approved_remark")
    private String approvedRemark;

    @ApiModelProperty("区块确认数")
    @TableField("confirms")
    private Integer confirms;

    @ApiModelProperty("提现源钱包地址")
    @TableField("from_address")
    private String fromAddress;

    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
